class Solution {
public:
    string replaceSpace(string s) {
        // write code here
        string str;
        for (const auto& ch : s)
        {
            if (isalpha(ch))
                str += ch;
            else
                str += "%20";
        }
        return str;
    }
};